package org.flexspeedup.blog.events
{
import flash.events.Event;
/**
 * Navigates to a section in the application
 */
public class NavigateToEvent extends Event
{
    //--------------------------------------------------------------------------
    //
    //  Class Properties
    //
    //--------------------------------------------------------------------------

    //--------------------------
    // ID
    //--------------------------
    /**
     * Unique id for this event.
     */
    public static const ID:String = "NavigateToEvent";
    
    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    /**
     * Creates a new instance of the <code>NavigateToEvent</code> event 
     */    
    public function NavigateToEvent(section:String)
    {
        super(ID, true, true);
        _section = section;
    }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------
    
    //----------------------------------
    //  section
    //----------------------------------

    /**
     *  @private
     */
    private var _section:String;

    /**
     * The section to navigate to
     */
    public function get section():String
    {
        return _section;
    }

    //--------------------------------------------------------------------------
    //
    //  Overridden Methods - Event
    //
    //--------------------------------------------------------------------------

    /**
     * @inheritdoc flash.events.Event#clone
     */
    override public function clone():Event
    {
        return new NavigateToEvent(section);
    }
}
}